package com.tech.koufu.model;

import org.json.JSONObject;

import android.os.Parcel;
import android.os.Parcelable;

public class CompetitionGroupUser implements Parcelable{

	 public String userName;
	 public String zongUp;
	 public CompetitionGroupUser(){
		 
	 }
	 public CompetitionGroupUser(JSONObject object){
		 this.userName = object.optString("username");
		 this.zongUp = object.optString("zongup");
	 }
	 public CompetitionGroupUser(Parcel parcel){
		userName =  parcel.readString() ;
		zongUp = parcel.readString();
	 }
	 
	 public static final Parcelable.Creator<CompetitionGroupUser> CREATOR = new Creator<CompetitionGroupUser>() {
		
		@Override
		public CompetitionGroupUser[] newArray(int size) { 
			return new CompetitionGroupUser[size];
		}
		
		@Override
		public CompetitionGroupUser createFromParcel(Parcel source) { 
			return new CompetitionGroupUser(source);
		}
	};
	 
	@Override
	public int describeContents() {
		 
		return 0;
	}
	@Override
	public void writeToParcel(Parcel dest, int flags) {
		 dest.writeString(userName);
		 dest.writeString(zongUp);
	}
	 
}
